<div id="user-nav" class="navbar navbar-inverse">
  <ul class="nav">
    <li  class="dropdown" id="profile-messages" >
    <a title="" href="#" data-toggle="dropdown" data-target="#profile-messages" class="dropdown-toggle">
    	<i class="icon icon-user"></i>  <span class="text">欢迎您 {{Auth::user()->nickname}}</span><b class="caret"></b>
    </a>
      <ul class="dropdown-menu">
      	<li><a href="{{URL('admin/reset-password')}}"><i class="icon-key"></i> 修改密码</a></li>
        <li><a href="{{URL('auth/logout')}}"><i class="icon-key"></i> 退出</a></li>
      </ul>
    </li>
    @if(Auth::user()->username == 'admin')
    {{--<li class=""><a title="" href="#"><i class="icon icon-cog"></i> <span class="text">帮助系统</span></a></li>--}}
    @endif
    @foreach($submodules as $key => $submodule)
    @if(!empty($submodule['children']))
    <li class="dropdown" id="menu-messages"><a href="#" data-toggle="dropdown" data-target="#menu-messages" class="dropdown-toggle"><i class="icon icon-envelope"></i> <span class="text">{{$submodule['name']}}</span> <b class="caret"></b></a>
      <ul class="dropdown-menu">
      	@foreach($submodule['children'] as $k => $v)
        <li><a class="sAdd" title="" href="{{$v['url']}}"><i class="icon-plus"></i> {{$v['name']}}</a></li>
        @endforeach
      </ul>
    </li>
    @else
    <li class=""><a title="" href="{{$submodule['url']}}"><i class="icon icon-cog"></i> <span class="text">{{$submodule['name']}}</span></a></li>
    @endif
    @endforeach
    <!-- <li class=""><a title="" href="#"><i class="icon icon-cog"></i> <span class="text">统计系统</span></a></li>
    <li class=""><a title="" href="#"><i class="icon icon-cog"></i> <span class="text">日志系统</span></a></li> -->
  </ul>
</div>